from rest_framework.permissions import BasePermission, OR
from rest_framework import HTTP_HEADER_ENCODING


class AllPermissions(BasePermission):
    """允许所有权限"""

    def has_permission(self, request, view):
        return True

    def has_object_permission(self, request, view, obj):
        return True


class MyPermissions(BasePermission):
    """允许所有权限"""

    def has_permission(self, request, view):
        return False

    def has_object_permission(self, request, view, obj):
        return False
